package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.dto.SetmealDto;
import com.itheima.reggie.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SetmealMapper extends BaseMapper<Setmeal> {

    //扩展方法:分页查询
    Page<SetmealDto> pageSetmealDto(@Param("page") Page<SetmealDto> pageInfo, @Param("name") String name);

    //扩展方法:根据id查询套餐详细信息(包含菜品信息)
    SetmealDto getByIdWithDish(@Param("id") Long id);
}


